package com.cf.module.app;

import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.alibaba.android.arouter.facade.annotation.Route;

/**
 * @author yangji
 */
@Route(path = "/app/login")
public class UserActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.app_module_activity_user);
    }

    public void login(View view) {
        UserModel.getInstance().login();
    }

    public void logout(View view) {
        new Thread(() -> {
            try {
                Thread.sleep(10 * 1000 * 1000);
                view.getContext();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }).start();
        UserModel.getInstance().logout();
    }
}
